<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>西安曲江城墙2010新春灯会</title>
<style type="text/css">
<!--
body {
	background-image: url(images/index_bg.jpg);
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
}
-->
</style>

<link href="css/main.css" rel="stylesheet" type="text/css" />
<script src="Scripts/AC_RunActiveContent.js" type="text/javascript"></script>
<script language="javascript">
function GE(id){
	if (document.getElementById){
		return document.getElementById(id);
	}else if (document.all){
		return document.all[id];

	}else if (document.layers){
		return document.layers[id];
	}else{
		return null;
	}
}
</script>
<style type="text/css">
<!--
.STYLE10 {color: #FFFF00}
-->
</style>
</head>

<body>
<table width="966" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td align="center" valign="top"><table width="960" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td><img src="images/index_banner_t1.jpg" width="960" height="64" border="0" usemap="#Map" /></td>
      </tr>
    </table>
    <table width="960" border="0" align="center" cellpadding="0" cellspacing="0">
      <tr>
        <td height="306" valign="top" background="images/index_banner_t2.jpg"><script type="text/javascript">
AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0','width','500','height','306','src','images/88','quality','high','pluginspage','http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash','wmode','transparent','movie','images/88' ); //end AC code
        </script>
          <noscript>
          <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="500" height="306">
            <param name="movie" value="images/88.swf" />
            <param name="quality" value="high" />
            <param name="wmode" value="transparent" />
            <embed src="images/88.swf" width="500" height="306" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" wmode="transparent"></embed>
          </object>
          </noscript>
          </td>
      </tr>
    </table>
      <table width="960" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td height="38" align="center" background="images/index_banner_t0.jpg"></td>
        </tr>
      </table>
      <table width="960" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr>
          <td align="center" valign="top" background="images/index_middle.jpg"></td>
        </tr>
      </table>
      <table width="960" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td align="center" background="images/index_middle.jpg">
	
 <div class="wrap">

<style type="text/CSS">
<!--

input { 
    border-right: #7b9ebd 1px solid;
 padding-right: 2px;
 border-top: #7b9ebd 1px solid;
 padding-left: 2px;
 font-size: 12px;
 filter: progid:DXImageTransform.Microsoft.Gradient(GradientType=0, StartColorStr=#ffffff, EndColorStr=#cecfde);
 border-left: #7b9ebd 1px solid;
 cursor: hand;
 color: black;
 padding-top: 2px;
 border-bottom: #7b9ebd 1px solid;
}
.img {
 filter:alpha(opacity=1,enabled=1)  blendtrans(duration=1);
    border:1px solid #CCCCCC;
}.photo_img{line-height:21px; clear:both;}
.photo_page ul{margin-left:200px;}
.photo_page li{float:left;margin-left:10px;}
.photo_page li span{border:1px solid #ccc;width:70px; height:20px;line-height:20px;display:block;}
.photo_info{margin-top:10px;clear:both;}
.photo_info li{text-align:left;line-height:22px;}
#photoli .listli2 li{ height:180px; width:216px; overflow:hidden; position:relative;}
#photoli .listli2 li img{height:150px; width:190px;}
#photoli .listli2 li span{ position:absolute; bottom:0; left:20px; text-align:c
-->
</style>
<script language="JavaScript">
var l=0;
var sum=0;
var chk_l;
var _c = 0;
var _i = 0;
var _v = 0;
var _l = 0;
var _fi = 0;
var _sf = 5000;
var _HTML = null;
var _image = null;
var _mycars= new Array();
var _w = new Array();
var _h = new Array();
var imgs = new Array();
var imgfname= new Array();
var limg=new Array();
var imgnames="<?php echo $titles;?>";
var imgname = imgnames.split("|");
var imgtext = "<?php echo $imgurls;?>";
var imgurls = imgtext.split("|");
var imgpath = "images/loading.jpg";

/* 渐隐渐现 */
function  transImg(enable){
 GE("showimg").filters.blendtrans.Apply();
 GE("showimg").filters[0].enabled=enable;
 GE("showimg").filters.blendtrans.Play();
}

/* 加载图片 */

function chk(){
  chk_l--;
  GE("rotatorPlayer").innerHTML='<img src='+limg[0].src+'><br><br>' + '照片已加载：' + parseInt(((sum-chk_l)*100/sum)).toString() + '%'
  if (chk_l==0){
   adRotator.play();
   GE('stops').disabled='';
   GE('next').disabled='';
  }
}

if (document.images){
  limg[0]=new Image();
  limg[0].src=imgpath;
  for(var i=0;i<imgurls.length;i++)
  {
    imgs[i]=new Image();
 	imgs[i].src=imgurls[i];
  }
 for(var i=0;i<imgname.length;i++)
  {
   	imgfname[i]=imgname[i];
    
  }
    
}


function adRotator() {}

adRotator.prototype = {
	
	add : function(p,w,h){
		_mycars[_c] = p;
   		_w[_c] = w;
   		_h[_c] = h;
   		_c = _c + 1;
	},
	
	/* 播放设置 */
	loads : function(){
	   if (_i < _mycars.length && _l < 1)
	   {
	     //按比例压缩图片
		if (imgs[_i].width>0 && imgs[_i].height>0) 
		{ 
		  var rate = 1; 
		 if (imgs[_i].width>_w[_i]|| imgs[_i].height>_h[_i]) 
		 { 
		  if (_w[_i]/imgs[_i].width<_h[_i]/imgs[_i].height) 
		   { 
		     rate = _w[_i]/imgs[_i].width; 
		    } 
		  else 
		    { 
		      rate = _h[_i]/imgs[_i].height; 
		    } 
		  } 
		if (window.navigator.appName == "Microsoft Internet Explorer") 
		 { 
		  //obj.style.zoom = rate; 
		  _w[_i] = imgs[_i].width*rate; 
		  _h[_i] = imgs[_i].height*rate; 
		 } 
		 else 
		{ 
		  _w[_i] = imgs[_i].width*rate; 
		  _h[_i] = imgs[_i].height*rate; 
		 }
		
		}
	
		 _HTML = '<img id="showimg" src="' + _mycars[_i] + '" width="' + _w[_i] + '" height="' + _h[_i] + '" class="img">'
	     if (_v < 1)
	     {
	        GE('image').value = _mycars[_i];//_HTML + ',' + _i;
	        GE('imgnames').innerHTML = imgfname[_i];	
		    GE('rotatorPlayer').innerHTML = _HTML;
	  		transImg(0);
	        _i = _i + 1;
	  		GE('backs').disabled='';
	  		transImg(1);
	  		transImg(0);
	        window.setTimeout("adRotator.loads("+_i+")",_sf);
	     }
		 
	   }
	   else
	   {
	     //按比例压缩图片
		if (imgs[_i].width>0 && imgs[_i].height>0) 
		{ 
		  var rate = 1; 
		 if (imgs[_i].width>_w[_i]|| imgs[_i].height>_h[_i]) 
		 { 
		  if (_w[_i]/imgs[_i].width<_h[_i]/imgs[_i].height) 
		   { 
		     rate = _w[_i]/imgs[_i].width; 
		    } 
		  else 
		    { 
		      rate = _h[_i]/imgs[_i].height; 
		    } 
		  } 
		if (window.navigator.appName == "Microsoft Internet Explorer") 
		 { 
		  //obj.style.zoom = rate; 
		  _w[_i] = imgs[_i].width*rate; 
		  _h[_i] = imgs[_i].height*rate; 
		 } 
		 else 
		{ 
		  _w[_i] = imgs[_i].width*rate; 
		  _h[_i] = imgs[_i].height*rate; 
		 }
		
		}
		
		 _HTML = '<img id="showimg" src="' + _mycars[_i] + '" width="' + _w[_i] + '" height="' + _h[_i] + '" class="img">'
	  	
		GE('image').value = _mycars[_i];//_HTML + ',' + _i;
	    GE('imgnames').innerHTML = imgfname[_i];
	    GE('rotatorPlayer').innerHTML = _HTML;	   		  
	    transImg(0);
	    transImg(1);
	    transImg(0);
	   }
	   if (_i+1 > _mycars.length)
	   {
	      GE('stops').disabled='True';
	   	  GE('play').disabled='';
	      GE('backs').disabled='';
	      GE('next').disabled='True';
	      _i = 0;
	      _v = 1;
	   }
	},
	
	/* 播放 */
	play : function(){
	   _v = 0;
	   _l = 0;
	   adRotator.loads();
	},
	
	/* 下一张 */
	next : function(){
	   _l = 1;
	   if(_i+1 < _mycars.length)
	   {
	      _i = _i + 1;
	   GE('play').disabled='';
	   GE('stops').disabled='True';
	   GE('backs').disabled='';
	   adRotator.loads();
	   }
	   else
	   {
	      GE('next').disabled='True';
	   }
	},
	
	/* 上一张 */
	backs : function(){
	   _l = 1;
	   if(_i-1 < 0)
	   {
	      GE('backs').disabled='True';
	   }
	   else
	   {
	      _i = _i - 1;
	   GE('play').disabled='';
	   GE('stops').disabled='True';
	   GE('next').disabled='';
	   adRotator.loads();
	   }
	},
	
	/* 间隔时间 */
	set : function(){
	   var _sfc = GE('second').value;
	   if (adRotator.isInteger(_sfc))
	   {
	     _sf = _sfc * 1000;
	   }
	   else
	   {
	     alert('提示：只能输入数字！');
	     GE('second').value=5;
	     GE('second').select();
	   }
	},
	
	/* 字符检测 */
	isInteger : function(str){  
	   var regu = /^[-]{0,1}[0-9]{1,}$/;
	  return regu.test(str);
	},
	
	/* 暂停 */
	stops : function(){
	   _v = 1;
	}
}
var adRotator = new adRotator();

/* 添加图片 */
for (var i=0;i<imgs.length;i++)
{
   adRotator.add(imgs[i].src,900,800);
}

</script>

<div class="ykmd">
   <div class="ykcd">
	<div class="photo_page">
	 <ul style=" margin-left:260px;">
	  <li><span style="width:76px;"><input type="button" name="play" value="开始播放" onClick="adRotator.play();this.disabled='true';GE('stops').disabled=''" disabled="True"/></span></li>
	  <li><span style="width:40px;"><input type="button" name="stops" value="暂停" onClick="adRotator.stops();this.disabled='true';GE('play').disabled=''" disabled="True"/></span></li>
	  <li><span  style="width:57px;"><input type="button" name="backs" value="上一张" onClick="adRotator.backs();" disabled="True"/></span></li>
      <li><span style="width:57px;"><input type="button" name="next" value="下一张" onClick="adRotator.next();" disabled="True"/></span></li>
      <li><span style="border:none;"><input type="text" id="second" value="5" size="3" maxlength="2">
秒</span></li>
      <li><span style="width:76px;"><input type="button" value="设置时间" onClick="adRotator.set()" /></span></li>
	 </ul>
	</div>
	<div class="photo_img" style="margin-top:10px" id="rotatorPlayer"><img src="images/loading.jpg"><br><br>照片已加载：0%</div>
	<div id="imgnames" style="clear:both;"></div>
	<div class="photo_info" style="margin-left:10px;">
	 <input name="image" id="image" type="hidden" size="65"/>
	</div>
   </div>
  </div>
<script language="JavaScript">
chk_l=sum=l=imgs.length;
for (var i=0;i<l;i++){
  imgs[1].onload;
  imgs[i].onerror;
  chk_l--;
  GE("rotatorPlayer").innerHTML='<img src='+limg[0].src+'><br><br>' + '照片已加载：' + parseInt(((sum-chk_l)*100/sum)).toString() + '%';
  if (chk_l==0){
   adRotator.play();
   GE('stops').disabled='';
   GE('next').disabled='';
  }
}
</script>

 </div>

		  </td>
        </tr>
      </table>
      <table width="960" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr>
          <td><img src="images/index_bottom.jpg" width="960" height="340" /></td>
        </tr>
      </table></td>
  </tr>
</table>

<?php
include template('footer');
?>